<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {margin: 0;padding: 0}
    </style>
</head>
<body>
    <div id="app">
        <!--将下列元素中的数据收集为一个字符串-->
        <!--<input type="text" v-model="message" placeholder="edit me">
        <textarea v-model="message"></textarea>-->

        <!--将单个复选框中的数据收集为一个布尔值-->
        <!--<input type="checkbox" id="checkbox" v-model="checked">
        <label for="checkbox">{{ checked }}</label>-->
        <!--将多个复选框中的数据收集为一个数组[value...]-->
        <!--<div id='example-3'>
            <input type="checkbox" id="jack" value="Jack" v-model="checkedNames">
            <label for="jack">Jack</label>
            <input type="checkbox" id="john" value="John" v-model="checkedNames">
            <label for="john">John</label>
            <input type="checkbox" id="mike" value="Mike" v-model="checkedNames">
            <label for="mike">Mike</label>
            <br>
            <span>Checked names: {{ checkedNames }}</span>
        </div>-->


        <!--将单选按钮中的数据收集为一个字符串-->
        <!--<div id="example-4">
            <input type="radio" id="one" value="One" v-model="picked">
            <label for="one">One</label>
            <br>
            <input type="radio" id="two" value="Two" v-model="picked">
            <label for="two">Two</label>
            <br>
            <input type="radio" id="three" value="three" v-model="picked">
            <label for="three">three</label>
            <br>
            <span>Picked: {{ picked }}</span>
        </div>
        <div id="example-5">
            <input type="radio" id="one2" value="One" v-model="picked2">
            <label for="one">One2</label>
            <br>
            <input type="radio" id="two2" value="Two" v-model="picked2">
            <label for="two">Two2</label>
            <br>
            <input type="radio" id="three2" value="three" v-model="picked2">
            <label for="three">three2</label>
            <br>
            <span>Picked: {{ picked2 }}</span>
        </div>-->

        <!--将下拉列表中的数据收集为一个字符串-->
        <div id="example-5">
            <select v-model="selected">
                <option value="">请选择</option>
                <option value="x">A</option>
                <option value="y">B</option>
                <option value="z">C</option>
            </select>
            <span>Selected: {{ selected }}</span>
        </div>
    </div>
</body>
<script src="../../js/vue.js"></script>
<script>
    Vue.config.productionTip=false;
    new Vue({
        el:"#app",
        data:{
            message:"yyy",
            checked:true,
            checkedNames:[],
            picked:'',
            picked2:"",
            selected:""
        }
    })
</script>
</html>